try:
    import pyi_splash
    pyi_splash.close()
except ImportError:
    pass

import os
import easygui
import tkinter as tk
from tkinter import *
import pyautogui
import random

def 叫(o):
    if o == "爸爸":
        g.destroy()
        easygui.msgbox("儿子乖！")
        exit()
    else:
        pass

class sc:
    def entry_jbb():
        root = Toplevel(g)
        root.title("叫爸爸")
        root.geometry(f"345x210+{str(random.randint(0, sx-345)-7)}+{str(random.randint(0, sy-210)-7)}")
        root.protocol("WM_DELETE_WINDOW", 0)
        root.resizable(False, False)
        root.attributes("-topmost", True)
        root.attributes("-alpha", 1)
        root.attributes("-toolwindow", True)
        jbblb = Label(root, text="快点叫爸爸！", font=("华文楷体", 40))
        jbblb.place(x=20, y=20)
        jbber = Entry(root, width=30, font=("华文楷体", 15))
        jbber.place(x=20, y=100)
        feb = Button(root, text="叫", font=("华文楷体", 20), command=lambda: 叫(jbber.get()))
        feb.place(x=20, y=150, width=280, height=40)
    def choice_jbb():
        root = Toplevel(g)
        root.title("叫爸爸")
        root.geometry(f"345x210+{str(random.randint(0, sx-345)-7)}+{str(random.randint(0, sy-210)-7)}")
        root.protocol("WM_DELETE_WINDOW", 0)
        root.resizable(False, False)
        root.attributes("-topmost", True)
        root.attributes("-alpha", 1)
        root.attributes("-toolwindow", True)
        jbblb = Label(root, text="快点叫爸爸！", font=("华文楷体", 40))
        jbblb.place(x=20, y=20)
        jbblb = Listbox(root, width=30, height=5, font=("华文楷体", 15))
        jbblb.place(x=20, y=100)
        jbblb.insert(1, "爸爸")
        jbblb.insert("end", "儿子")
        jbblb.insert("end", "儿子")
        jbblb.insert("end", "儿子")
        jbblb.insert("end", "儿子")
        feb = Button(root, text="叫", font=("华文楷体", 20), command=lambda: 叫(jbblb.get()))
        feb.place(x=20, y=150, width=280, height=40)


sx, sy = pyautogui.size()
g = Tk()
g.title("叫爸爸")
g.geometry("345x210")
g.protocol("WM_DELETE_WINDOW", 0)
g.resizable(False, False)
g.attributes("-topmost", True)
g.attributes("-alpha", 1)
g.attributes("-toolwindow", True)

for i in range(511):
    g.update()
    sc.entry_jbb()
g.mainloop()